int removeElement(int* nums, int numsSize, int val) {

    int src  = 0,dest = 0;
    while(src < numsSize)
    {
        if(nums[src] != val)
        {
            nums[dest++] = nums[src++];
        }
        else
        {
            src++;
        }
    }
    
    return dest;
}
